/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * EditarCliente1.java
 *
 * Created on Nov 22, 2011, 11:50:54 PM
 */
package br.fesppr.sacob.gui;

import br.fesppr.sacob.dao.PessoaDAO;
import br.fesppr.sacob.dto.PessoaDTO;
import javax.swing.text.MaskFormatter;

/**
 *
 * @author chrestenzen
 */
public class EditarCliente extends javax.swing.JFrame {

    /** Creates new form EditarCliente1 */
    public EditarCliente() {
        initComponents();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jSeparator6 = new javax.swing.JSeparator();
        lblTextSacob = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        try
        {
            MaskFormatter formatterCpf = new MaskFormatter("###.###.###-##");
            formatterCpf.setPlaceholderCharacter('_');
            txtBuscaCpf = new javax.swing.JFormattedTextField(formatterCpf);
            btnBuscar = new javax.swing.JButton();
            lblTxtDados3 = new javax.swing.JLabel();
            lblNome = new javax.swing.JLabel();
            txtNome = new javax.swing.JTextField();
            lblDateNasc = new javax.swing.JLabel();
            lblSexo3 = new javax.swing.JLabel();
            comboSexo = new javax.swing.JComboBox();
            lblCpf = new javax.swing.JLabel();
            txtCpf = new javax.swing.JTextField();
            lblRg = new javax.swing.JLabel();
            lblTel = new javax.swing.JLabel();
            lblCel = new javax.swing.JLabel();
            lblEmail = new javax.swing.JLabel();
            txtEmail = new javax.swing.JTextField();
            lblCep = new javax.swing.JLabel();
            lblEnd = new javax.swing.JLabel();
            txtEnd = new javax.swing.JTextField();
            lblNum = new javax.swing.JLabel();
            txtNum = new javax.swing.JTextField();
            lblBairro = new javax.swing.JLabel();
            txtBairro = new javax.swing.JTextField();
            lblCid = new javax.swing.JLabel();
            txtCid = new javax.swing.JTextField();
            lblUf = new javax.swing.JLabel();
            txtUf = new javax.swing.JTextField();
            btnSalva = new javax.swing.JButton();
            try
            {
                MaskFormatter formatterData = new MaskFormatter("##/##/####");
                formatterData.setPlaceholderCharacter('_');
                txtData = new javax.swing.JFormattedTextField(formatterData);
                jFormattedTextField1 = new javax.swing.JFormattedTextField();
                try
                {
                    MaskFormatter formatterRg = new MaskFormatter("#######-#");
                    formatterRg.setPlaceholderCharacter('_');
                    txtRg = new javax.swing.JFormattedTextField(formatterRg);
                    try
                    {
                        MaskFormatter formatterTel = new MaskFormatter("(##)####-####");
                        formatterTel.setPlaceholderCharacter('_');
                        txtTel = new javax.swing.JFormattedTextField(formatterTel);
                        try
                        {
                            MaskFormatter formatterCel = new MaskFormatter("(##)####-####");
                            formatterCel.setPlaceholderCharacter('_');
                            txtCel = new javax.swing.JFormattedTextField(formatterCel);
                            try
                            {
                                MaskFormatter formatterCep = new MaskFormatter("#####-###");
                                formatterCep.setPlaceholderCharacter('_');
                                txtCep = new javax.swing.JFormattedTextField(formatterCep);
                                jSeparator7 = new javax.swing.JSeparator();

                                setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
                                setTitle("SACOB -  Editar Pessoa");
                                setResizable(false);

                                lblTextSacob.setFont(new java.awt.Font("DejaVu Sans", 1, 12));
                                lblTextSacob.setForeground(new java.awt.Color(3, 3, 3));
                                lblTextSacob.setText("SACOB - Sistema de Atendimento ao Cliente Belíssima ");

                                jLabel3.setText("Busca dados por CPF:");

                            }catch(Exception e){}

                            btnBuscar.setText("Buscar");
                            btnBuscar.addActionListener(new java.awt.event.ActionListener() {
                                public void actionPerformed(java.awt.event.ActionEvent evt) {
                                    btnBuscarActionPerformed(evt);
                                }
                            });

                            lblTxtDados3.setFont(new java.awt.Font("DejaVu Sans", 1, 10));
                            lblTxtDados3.setText("Dados Pessoais");

                            lblNome.setFont(new java.awt.Font("DejaVu Sans", 0, 12));
                            lblNome.setText("Nome Completo:");

                            txtNome.setFont(new java.awt.Font("DejaVu Sans", 0, 10));

                            lblDateNasc.setFont(new java.awt.Font("DejaVu Sans", 0, 12));
                            lblDateNasc.setText("Data de Nascimento:");

                            lblSexo3.setText("Sexo:");

                            comboSexo.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Masculino", "Feminino" }));

                            lblCpf.setFont(new java.awt.Font("DejaVu Sans", 0, 12));
                            lblCpf.setText("CPF:");

                            txtCpf.setEditable(false);
                            txtCpf.setFont(new java.awt.Font("DejaVu Sans", 0, 10));
                            txtCpf.setForeground(new java.awt.Color(204, 204, 204));

                            lblRg.setFont(new java.awt.Font("DejaVu Sans", 0, 12));
                            lblRg.setText("R.G");

                            lblTel.setFont(new java.awt.Font("DejaVu Sans", 0, 12));
                            lblTel.setText("Telefone:");

                            lblCel.setFont(new java.awt.Font("DejaVu Sans", 0, 12));
                            lblCel.setText("Celular:");

                            lblEmail.setFont(new java.awt.Font("DejaVu Sans", 0, 12));
                            lblEmail.setText("E-mail:");

                            txtEmail.setFont(new java.awt.Font("DejaVu Sans", 0, 10));

                            lblCep.setFont(new java.awt.Font("DejaVu Sans", 0, 12));
                            lblCep.setText("CEP:");

                            lblEnd.setFont(new java.awt.Font("DejaVu Sans", 0, 12));
                            lblEnd.setText("Endereço:");

                            txtEnd.setFont(new java.awt.Font("DejaVu Sans", 0, 10));

                            lblNum.setFont(new java.awt.Font("DejaVu Sans", 0, 12));
                            lblNum.setText("Número:");

                            txtNum.setFont(new java.awt.Font("DejaVu Sans", 0, 10));

                            lblBairro.setFont(new java.awt.Font("DejaVu Sans", 0, 12));
                            lblBairro.setText("Bairro:");

                            txtBairro.setFont(new java.awt.Font("DejaVu Sans", 0, 10));

                            lblCid.setFont(new java.awt.Font("DejaVu Sans", 0, 12));
                            lblCid.setText("Cidade:");

                            txtCid.setFont(new java.awt.Font("DejaVu Sans", 0, 10));

                            lblUf.setFont(new java.awt.Font("DejaVu Sans", 0, 12));
                            lblUf.setText("Estado:");

                            txtUf.setFont(new java.awt.Font("DejaVu Sans", 0, 10));

                            btnSalva.setFont(new java.awt.Font("DejaVu Sans", 0, 12));
                            btnSalva.setText("Salvar Alterações");
                            btnSalva.addActionListener(new java.awt.event.ActionListener() {
                                public void actionPerformed(java.awt.event.ActionEvent evt) {
                                    btnSalvaActionPerformed(evt);
                                }
                            });

                        }
                        catch(Exception e)
                        {}

                        jFormattedTextField1.setText("jFormattedTextField1");

                    }
                    catch (Exception e)
                    {}

                }
                catch(Exception e)
                {
                }

            }
            catch(Exception e)
            {}

        }
        catch(Exception e)
        {}

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jSeparator6, javax.swing.GroupLayout.DEFAULT_SIZE, 398, Short.MAX_VALUE)
            .addGroup(layout.createSequentialGroup()
                .addGap(28, 28, 28)
                .addComponent(lblTextSacob)
                .addContainerGap(59, Short.MAX_VALUE))
            .addGroup(layout.createSequentialGroup()
                .addGap(42, 42, 42)
                .addComponent(jLabel3)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(txtBuscaCpf, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnBuscar)
                .addGap(31, 31, 31))
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(lblTxtDados3)
                .addContainerGap(308, Short.MAX_VALUE))
            .addComponent(jSeparator7, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 398, Short.MAX_VALUE)
            .addGroup(layout.createSequentialGroup()
                .addGap(31, 31, 31)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(lblNome)
                        .addGap(2, 2, 2)
                        .addComponent(txtNome, javax.swing.GroupLayout.PREFERRED_SIZE, 184, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 56, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(lblBairro)
                                .addGap(1, 1, 1)
                                .addComponent(txtBairro, javax.swing.GroupLayout.PREFERRED_SIZE, 105, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(lblCid)
                                .addGap(1, 1, 1)
                                .addComponent(txtCid, javax.swing.GroupLayout.DEFAULT_SIZE, 37, Short.MAX_VALUE))
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(lblEnd)
                                .addGap(6, 6, 6)
                                .addComponent(txtEnd, javax.swing.GroupLayout.DEFAULT_SIZE, 107, Short.MAX_VALUE)
                                .addGap(10, 10, 10)
                                .addComponent(lblNum))
                            .addComponent(btnSalva))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(lblUf)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(txtUf, javax.swing.GroupLayout.PREFERRED_SIZE, 57, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addComponent(txtNum, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(lblTel)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtTel, javax.swing.GroupLayout.PREFERRED_SIZE, 95, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(lblCel)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtCel, javax.swing.GroupLayout.DEFAULT_SIZE, 135, Short.MAX_VALUE))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
                                .addComponent(lblDateNasc)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(txtData, javax.swing.GroupLayout.PREFERRED_SIZE, 93, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(lblSexo3))
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(lblCpf)
                                .addGap(2, 2, 2)
                                .addComponent(txtCpf, javax.swing.GroupLayout.DEFAULT_SIZE, 94, Short.MAX_VALUE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(lblRg)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(txtRg, javax.swing.GroupLayout.DEFAULT_SIZE, 93, Short.MAX_VALUE)))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(comboSexo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(14, 14, 14))
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(lblCep)
                        .addGap(3, 3, 3)
                        .addComponent(txtCep, javax.swing.GroupLayout.PREFERRED_SIZE, 76, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(lblEmail)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtEmail, javax.swing.GroupLayout.PREFERRED_SIZE, 159, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGap(31, 31, 31))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(lblTextSacob)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jSeparator6, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel3)
                    .addComponent(btnBuscar)
                    .addComponent(txtBuscaCpf, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jSeparator7, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(2, 2, 2)
                .addComponent(lblTxtDados3, javax.swing.GroupLayout.PREFERRED_SIZE, 7, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblNome)
                    .addComponent(txtNome, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblDateNasc)
                    .addComponent(txtData, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lblSexo3)
                    .addComponent(comboSexo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txtCpf, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lblCpf)
                    .addComponent(lblRg)
                    .addComponent(txtRg, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblTel)
                    .addComponent(txtTel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lblCel)
                    .addComponent(txtCel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblCep)
                    .addComponent(txtCep, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lblEmail)
                    .addComponent(txtEmail, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblEnd)
                    .addComponent(txtEnd, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lblNum)
                    .addComponent(txtNum, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblBairro)
                    .addComponent(txtBairro, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lblCid)
                    .addComponent(txtCid, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtUf, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lblUf))
                .addGap(18, 18, 18)
                .addComponent(btnSalva)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

private void btnBuscarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnBuscarActionPerformed
// TODO add your handling code here:
        PessoaDTO pessoa =  new PessoaDTO();
//        PessoaDAO dao = new PessoaDAO();
        
        String cpf = txtBuscaCpf.getText();
        
        pessoa = dao.listaPorCPF(cpf);
        
        txtNome.setText(pessoa.getNome());
        
        txtEnd.setText(pessoa.getLogradouro());
        txtNum.setText(pessoa.getNumero() + "");
        txtBairro.setText(pessoa.getBairro());
        txtCep.setText(pessoa.getCep());
        txtCid.setText(pessoa.getCidade());
        txtUf.setText(pessoa.getEstado());
        txtCpf.setText(pessoa.getCpf());
        txtRg.setText(pessoa.getRg());
        txtTel.setText(pessoa.getTelefone() +  "");
        txtCel.setText(pessoa.getCelular() + "");
        txtEmail.setText(pessoa.getEmail());
        txtData.setText(pessoa.getDataNascimento());
   
}//GEN-LAST:event_btnBuscarActionPerformed

private void btnSalvaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSalvaActionPerformed
        // TODO add your handling code here:
        PessoaDTO pessoaeditada =  new PessoaDTO();
        
        pessoaeditada.setNome(txtNome.getText());
        pessoaeditada.setTelefone((txtTel.getText()));
        pessoaeditada.setCelular((txtCel.getText()));
        pessoaeditada.setLogradouro(txtEnd.getText());
        pessoaeditada.setCidade(txtCid.getText());
        pessoaeditada.setEstado(txtUf.getText());
        pessoaeditada.setBairro(txtBairro.getText());
        pessoaeditada.setCep(txtCep.getText());
        pessoaeditada.setEmail(txtEmail.getText());
        pessoaeditada.setNumero(Integer.parseInt(txtNum.getText()));
        pessoaeditada.setDataNascimento(txtData.getText());
        
        
        
        dao.editarPessoa(pessoaeditada, txtCpf.getText());
        
}//GEN-LAST:event_btnSalvaActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(EditarCliente.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(EditarCliente.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(EditarCliente.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(EditarCliente.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run() {
                new EditarCliente().setVisible(true);
            }
        });
    }
    PessoaDAO dao = new PessoaDAO();
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnBuscar;
    private javax.swing.JButton btnSalva;
    private javax.swing.JComboBox comboSexo;
    private javax.swing.JFormattedTextField jFormattedTextField1;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JSeparator jSeparator6;
    private javax.swing.JSeparator jSeparator7;
    private javax.swing.JLabel lblBairro;
    private javax.swing.JLabel lblCel;
    private javax.swing.JLabel lblCep;
    private javax.swing.JLabel lblCid;
    private javax.swing.JLabel lblCpf;
    private javax.swing.JLabel lblDateNasc;
    private javax.swing.JLabel lblEmail;
    private javax.swing.JLabel lblEnd;
    private javax.swing.JLabel lblNome;
    private javax.swing.JLabel lblNum;
    private javax.swing.JLabel lblRg;
    private javax.swing.JLabel lblSexo3;
    private javax.swing.JLabel lblTel;
    private javax.swing.JLabel lblTextSacob;
    private javax.swing.JLabel lblTxtDados3;
    private javax.swing.JLabel lblUf;
    private javax.swing.JTextField txtBairro;
    private javax.swing.JFormattedTextField txtBuscaCpf;
    private javax.swing.JFormattedTextField txtCel;
    private javax.swing.JFormattedTextField txtCep;
    private javax.swing.JTextField txtCid;
    private javax.swing.JTextField txtCpf;
    private javax.swing.JFormattedTextField txtData;
    private javax.swing.JTextField txtEmail;
    private javax.swing.JTextField txtEnd;
    private javax.swing.JTextField txtNome;
    private javax.swing.JTextField txtNum;
    private javax.swing.JFormattedTextField txtRg;
    private javax.swing.JFormattedTextField txtTel;
    private javax.swing.JTextField txtUf;
    // End of variables declaration//GEN-END:variables
}
